class Bag < ActiveRecord::Base
  attr_accessible :quantity
  belongs_to :person
  
  def self.number_of_empty_bags
    count = 0
    Bag.all.each do |bag|
      count = count +1 if bag.person.nil?
    end
    count
  end
end
